<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateContasTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateContasLabel_idConta}" for="idConta" />
                    <h:inputText id="idConta" value="#{contasController.selected.idConta}" title="#{bundle.CreateContasTitle_idConta}" required="true" requiredMessage="#{bundle.CreateContasRequiredMessage_idConta}"/>
                    <h:outputLabel value="#{bundle.CreateContasLabel_descricao}" for="descricao" />
                    <h:inputText id="descricao" value="#{contasController.selected.descricao}" title="#{bundle.CreateContasTitle_descricao}" required="true" requiredMessage="#{bundle.CreateContasRequiredMessage_descricao}"/>
                    <h:outputLabel value="#{bundle.CreateContasLabel_nivel}" for="nivel" />
                    <h:inputText id="nivel" value="#{contasController.selected.nivel}" title="#{bundle.CreateContasTitle_nivel}" />
                    <h:outputLabel value="#{bundle.CreateContasLabel_quantia}" for="quantia" />
                    <h:inputText id="quantia" value="#{contasController.selected.quantia}" title="#{bundle.CreateContasTitle_quantia}" required="true" requiredMessage="#{bundle.CreateContasRequiredMessage_quantia}"/>
                    <h:outputLabel value="#{bundle.CreateContasLabel_contaMae}" for="contaMae" />
                    <h:selectOneMenu id="contaMae" value="#{contasController.selected.contaMae}" title="#{bundle.CreateContasTitle_contaMae}" required="true" requiredMessage="#{bundle.CreateContasRequiredMessage_contaMae}">
                        <f:selectItems value="#{contasController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateContasLabel_fkClasse}" for="fkClasse" />
                    <h:selectOneMenu id="fkClasse" value="#{contasController.selected.fkClasse}" title="#{bundle.CreateContasTitle_fkClasse}" required="true" requiredMessage="#{bundle.CreateContasRequiredMessage_fkClasse}">
                        <f:selectItems value="#{classeContaController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{contasController.create}" value="#{bundle.CreateContasSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{contasController.prepareList}" value="#{bundle.CreateContasShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateContasIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
